package com.hksj.am.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hksj.am.query.AmmoniaDeviceHistoryQuery;
import com.hksj.am.query.AmmoniaDeviceQuery;
import com.hksj.am.vo.AmmoniaDeviceHistoryVO;
import com.hksj.am.vo.AmmoniaDeviceVO;
import com.hksj.common.config.annotation.DS_TAOS;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AmmoniaDeviceMapper {

    List<AmmoniaDeviceVO> queryAmmoniaDeviceByPaging(@Param("page") IPage<AmmoniaDeviceVO> page, @Param("query") AmmoniaDeviceQuery query);

    @DS_TAOS
    Double queryMaxConcentration(@Param("tableName")String tableName, @Param("deviceId") String deviceId);

    @DS_TAOS
    List<AmmoniaDeviceHistoryVO> queryAmmoniaDeviceHistoryList(@Param("query")AmmoniaDeviceHistoryQuery query,@Param("tableName") String tableName);

    @DS_TAOS
    Long queryAmmoniaDeviceHistoryCount(@Param("query")AmmoniaDeviceHistoryQuery query,@Param("tableName") String tableName);
}
